package com.day2;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet("/login")
public class Login extends HttpServlet{
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //super.service(req, resp);
        req.setCharacterEncoding("UTF-8");
        resp.setContentType("text/html;charset=utf-8");
        String username = req.getParameter("username");
        String passward = req.getParameter("passward");

//        req.setAttribute("name",name);
//        Cookie ck1=new Cookie("name",name);
//        ck1.setMaxAge(3600*24*3);
//        resp.addCookie(ck1);
//        req.getRequestDispatcher("success").forward(req,resp);


    }
}
